//
//  YJBTradeTabBarViewController.m
//  YunJiaBaoFirst
//
//  Created by 腾云小白龍 on 16/7/29.
//  Copyright © 2016年 腾云小白龍. All rights reserved.
//

#import "YJBTradeTabBarViewController.h"
#import "MainNavigationViewController.h"
#import "YJBTradeDealViewController.h"
#import "YJBSearchRecordViewController.h"
#import "YJBMyAccountViewController.h"
#import "YJBTradeExplainViewController.h"


@interface YJBTradeTabBarViewController ()

@end

@implementation YJBTradeTabBarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initChildViewController];
}

-(void)initChildViewController{
    YJBMyAccountViewController *account = [[YJBMyAccountViewController alloc]init];
    [self addChildViewController:account withTitle:@"我的账户" withNormalImage:@"tab_bar_personal_icon" withSelectImage:@"tab_bar_personal_icon_selected"];
    
    YJBTradeDealViewController *deal = [[YJBTradeDealViewController alloc]init];
    [self addChildViewController:deal withTitle:@"运力买卖" withNormalImage:@"tabbar_deal_Noraml" withSelectImage:@"tabbar_deal_select"];
    
    YJBSearchRecordViewController *search = [[YJBSearchRecordViewController alloc]init];
    [self addChildViewController:search withTitle:@"记录查询" withNormalImage:@"tab_bar_search" withSelectImage:@"tab_bar_search_selected"];
    
    YJBTradeExplainViewController *expalin = [[YJBTradeExplainViewController alloc]init];
    [self addChildViewController:expalin withTitle:@"合约详情" withNormalImage:@"tabbar_explain_Normal" withSelectImage:@"tabbar_explain_select"];
}

-(void)addChildViewController:(UIViewController *)childController withTitle:(NSString *)title withNormalImage:(NSString *)imageName withSelectImage:(NSString*)imageNameSel{
    
//    childController.title = title;
//    childController.tabBarItem.image = [UIImage imageNamed:imageName];
//    childController.tabBarItem.selectedImage = [[UIImage imageNamed:imageNameSel] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
//    MainNavigationViewController *navVC = [[MainNavigationViewController alloc]initWithRootViewController:childController];
//    [self addChildViewController:navVC];
//    
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
